﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FontTool
{
    public partial class commandBacklog : Form
    {
        public delegate void executeCommand(commandGlyph cmd);
        public executeCommand execute;

        private bool indexChanged = false;

        public commandBacklog(commandGlyphManager cmdMng)
        {
            InitializeComponent();

            foreach (commandGlyph cmd in cmdMng.commandStack)
                listBox1.Items.Add(cmd);
        }

        private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            execute((commandGlyph)listBox1.SelectedItem);
            indexChanged = true;
        }
    }
}
